package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.List;


/**
 * The persistent class for the payment_type database table.
 * 
 */
@Entity
@Table(name="payment_type")
@NamedQueries({
@NamedQuery(name="PaymentType.findAll", query="SELECT p FROM PaymentType p"),
@NamedQuery(name="PaymentType.deleteById", query="DELETE FROM PaymentType WHERE paymentTypeId = :P1")
})
public class PaymentType implements Serializable {

	private static final long serialVersionUID = 8382944258869798450L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="payment_type_id")
	private Integer paymentTypeId;

	@Column(name="payment_type_name")
	private String paymentTypeName;

	//bi-directional many-to-one association to Payment
	@OneToMany(mappedBy="paymentType", fetch=FetchType.LAZY)
	private List<Payment> payments;

	public Integer getPaymentTypeId() {
		return this.paymentTypeId;
	}

	public void setPaymentTypeId(Integer paymentTypeId) {
		this.paymentTypeId = paymentTypeId;
	}

	public String getPaymentTypeName() {
		return this.paymentTypeName;
	}

	public void setPaymentTypeName(String paymentTypeName) {
		this.paymentTypeName = paymentTypeName;
	}

	public List<Payment> getPayments() {
		return this.payments;
	}

	public void setPayments(List<Payment> payments) {
		this.payments = payments;
	}
}